/**
 * supplier/supplier
 * =======================================
 * list
 * edit
 * remove
 * view
 * statusList
 * changeStatus
 * changeSort
 * batchRemove
 */

import request from '@/utils/request'

// 商家分类
export function getCategory(data) {
  return request({
    url: '/api/uni/supplier/supplier/category',
    method: 'post',
    data
  })
}

// list
export function list(data) {
  return request({
    url: '/api/uni/supplier/supplier/list',
    method: 'post',
    data
  })
}

// edit
export function edit(data) {
  return request({
    url: '/api/uni/supplier/supplier/edit',
    method: 'post',
    data
  })
}

// remove
export function remove(data) {
  return request({
    url: '/api/uni/supplier/supplier/remove',
    method: 'post',
    data
  })
}

// view
export function view(data) {
  return request({
    url: '/api/uni/supplier/supplier/view',
    method: 'post',
    data
  })
}

export function scan(data) {
  return request({
    url: '/api/uni/supplier/supplier/scan',
    method: 'post',
    data
  })
}

// statusList
export function statusList(data) {
  return request({
    url: '/api/uni/supplier/supplier/status-list',
    method: 'post',
    data
  })
}

// changeStatus
export function changeStatus(data) {
  return request({
    url: '/api/uni/supplier/supplier/change-status',
    method: 'post',
    data
  })
}

// changeSort
export function changeSort(data) {
  return request({
    url: '/api/uni/supplier/supplier/change-sort',
    method: 'post',
    data
  })
}

// batchRemove
export function batchRemove(data) {
  return request({
    url: '/api/uni/supplier/supplier/batch-remove',
    method: 'post',
    data
  })
}

// check notification
export function notification(data) {
  return request({
    url: '/api/uni/supplier/supplier/notification',
    method: 'post',
    data
  })
}

// check list
export function checkList(data) {
  return request({
    url: '/api/uni/supplier/supplier/check-list',
    method: 'post',
    data
  })
}

export function checkOk(data) {
  return request({
    url: '/api/uni/supplier/supplier/check-ok',
    method: 'post',
    data
  })
}

// ---- 供应商分类 ---------------------------------------------------

// list
export function listCategory(data) {
  return request({
    url: '/api/uni/supplier/category/list',
    method: 'post',
    data
  })
}

// edit
export function editCategory(data) {
  return request({
    url: '/api/uni/supplier/category/edit',
    method: 'post',
    data
  })
}

export function editCategoryImage(data) {
  return request({
    url: '/api/uni/supplier/category/edit-image',
    method: 'post',
    data
  })
}

// remove
export function removeCategory(data) {
  return request({
    url: '/api/uni/supplier/category/remove',
    method: 'post',
    data
  })
}

// view
// export function view(data) {
//   return request({
//     url: '/api/uni/system/express-company/view',
//     method: 'post',
//     data
//   })
// }
//
// // statusList
// export function statusList(data) {
//   return request({
//     url: '/api/uni/system/express-company/status-list',
//     method: 'post',
//     data
//   })
// }

// changeStatus
export function changeStatusCategory(data) {
  return request({
    url: '/api/uni/supplier/category/change-status',
    method: 'post',
    data
  })
}

// changeSort
export function changeSortCategory(data) {
  return request({
    url: '/api/uni/supplier/category/change-sort',
    method: 'post',
    data
  })
}

// batchRemove
export function batchRemoveCategory(data) {
  return request({
    url: '/api/uni/supplier/category/batch-remove',
    method: 'post',
    data
  })
}

// ---- 供应商地区 ---------------------------------------------------

// list
export function listAddress(data) {
  return request({
    url: '/api/uni/supplier/address/list',
    method: 'post',
    data
  })
}

// edit
export function editAddress(data) {
  return request({
    url: '/api/uni/supplier/address/edit',
    method: 'post',
    data
  })
}

// remove
export function removeAddress(data) {
  return request({
    url: '/api/uni/supplier/address/remove',
    method: 'post',
    data
  })
}

// view
// export function view(data) {
//   return request({
//     url: '/api/uni/system/express-company/view',
//     method: 'post',
//     data
//   })
// }
//
// // statusList
// export function statusList(data) {
//   return request({
//     url: '/api/uni/system/express-company/status-list',
//     method: 'post',
//     data
//   })
// }

// changeStatus
export function changeStatusAddress(data) {
  return request({
    url: '/api/uni/supplier/address/change-status',
    method: 'post',
    data
  })
}

// changeSort
export function changeSortAddress(data) {
  return request({
    url: '/api/uni/supplier/address/change-sort',
    method: 'post',
    data
  })
}

// batchRemove
export function batchRemoveAddress(data) {
  return request({
    url: '/api/uni/supplier/address/batch-remove',
    method: 'post',
    data
  })
}
